package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.ProductService;
import com.atguigu.spzx.manager.service.ProductServiceZxw;
import com.atguigu.spzx.model.dto.product.ProductDto;
import com.atguigu.spzx.model.entity.product.Product;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value="/zxw/admin/product/product")
public class ProductControllerZxw {
    @Autowired
    private ProductServiceZxw productServiceZxw;
    //测试
    @GetMapping("/anyway001")
    public Result anyway001() {
        System.out.print("\33[43;1m"+ "This is text with background color code" +"\n\33[0m");
        List<Product> productList = productServiceZxw.findProductAllData();
        System.out.print("\33[44;1m"+ productList +"\n\33[0m");
        return Result.build(productList, ResultCodeEnum.SUCCESS);
    }


}
